package com.lengchangjing.BehavioralPatterns.InterpreterPattern;

public class NonterminalExpression extends AbstractExpression {

    private AbstractExpression left;
    private AbstractExpression right;

    public NonterminalExpression(AbstractExpression left, AbstractExpression rigth)
    {
        this.left = left;
        this.right = rigth;
    }

    @Override
    public String Interpret(Context ctx) {
        return this.left.Interpret(ctx) + " and " + this.right.Interpret(ctx);
    }
}
